package com.kvn.backdoor.entity;

import java.io.Serializable;

/**
 * db配置实体
 * Created by wangzhiyuan on 2018/8/16
 */
public class DbConfig implements Serializable {
    private Integer id;
    private String env;
    private String url;
    private String userName;
    private String password;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEnv() {
        return env;
    }

    public void setEnv(String env) {
        this.env = env;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public int hashCode() {
        return url.hashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (!(obj instanceof DbConfig)) {
            return false;
        }

        DbConfig other = (DbConfig) obj;
        if (url.equals(other.url) && userName.equals(other.userName) && password.equals(other.password)) {
            return true;
        }

        return false;
    }
}
